import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

import org.w3c.dom.Document;


public class CustomerDAO {

	   public Document getCustomerList(Connection connection)
	   {
	      Document doc = null;

	      try
	      {
	         Statement stmt = connection.createStatement();
	         ResultSet rs = stmt.executeQuery("SELECT * from Students");

	         doc = JDBCUtil.toDocument(rs);

	         rs.close();
	         stmt.close();
	      }
	      catch (Exception e)
	      {
	         e.printStackTrace();
	      }

	      return doc;
	   }
	
}
